<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">        
        <ui:define name="title">
            <h:outputText value="#{ruta.TituloCrearNuevo}"></h:outputText>
        </ui:define>
        <ui:define name="body">            

            <h:form id="frmDetalleRutas">                

                <p:growl id="msgs" showDetail="true" />

                <h:panelGroup id="messagePanel" layout="block">
                    <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                </h:panelGroup>


                <p:panel header="Detalle de Ruta" style="font-size: small">
                    <h:inputHidden value="#{rutaController.selected.id}"/>
                    <table width="434" border="0">
                        <tr>
                            <th align="right" scope="row"><h:outputText value="#{ruta.Codigo}:"/></th>
                            <td align="left"><h:outputText id="txtCodigo" value="#{rutaController.selected.codigo}"/></td>
                        </tr>
                        <tr>
                            <th  align="right" scope="row"><h:outputText value="#{ruta.Nombre}:"/></th>
                            <td  align="left"><h:outputText id="txtNombre" value="#{rutaController.selected.nombre}" /></td>
                        </tr>
                        <tr>
                            <th  align="right" scope="row"><h:outputText value="#{ruta.InicioHora}:"/></th>
                            <td  align="left"><h:outputText id="txtHoraInicio" value="#{rutaController.selected.inicioHora}" /></td>                            
                        </tr>
                        <tr>
                            <th  align="right" scope="row"><h:outputText value="#{ruta.FinHora}:"/></th>
                            <td  align="left"><h:outputText id="txtHoraFin" value="#{rutaController.selected.finHora}" /></td>                            
                        </tr>                           
                        <tr>
                            <th align="right" scope="row">#{ruta.Distancia}</th>
                            <td align="left"><h:outputText id="txtDistancia" value="#{rutaController.selected.distancia}" /></td>
                        </tr>
                        <tr>
                            <th align="right" scope="row">#{ruta.NroUnidades}</th>
                            <td align="left"><h:outputText id="txtNroUnidades" value="#{rutaController.selected.numBuses}" /></td>
                        </tr>
                        <tr>
                            <th align="right" scope="row"><p:outputLabel value="Tipo de Dia: " /></th>
                            <td align="left"><h:outputText id="txtTipoDia" value="#{rutaController.selected.tipoDia}"/></td>
                        </tr>                        
                    </table> 
                    <div align="left" style="font-size: small">                        
                        <p:commandLink ajax="false"
                            action="#{rutaController.cargarModificarRuta(rutaController.selected.id)}" 
                            value="#{ruta.Modificar}"
                            rendered="#{accionController.getAccionByVista('Rutas', 'Editar')}"/>
                        <br />
                        <h:link outcome="Index" value="#{ayudante.RegresarIndex}"/>
                    </div>                        
                </p:panel>                             
            </h:form>
        </ui:define>
    </ui:composition>
</html>

